home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gbrowse.zip / TEST.PRG < prev    next >
Text File  |  1992-07-12  |  2KB  |  46 lines

  1. **************************************************************************
  2. *
  3. * Test.prg - Test program to demonstrate the new get object type: Browse.
  4. *
  5. * (c) Copyright 1992, John D. Lay 
  6. * All rights reserved.
  7. *
  8. * For more information please contact me via CompuServe
  9. *
  10. * John Lay
  11. * 70441,1543
  12. *
  13. #include "gbrowse.ch"
  14. **************************************************************************
  15. FUNCTION MAIN()
  16.    LOCAL nField := 0, cField := "test"
  17.    LOCAL GetList := {}
  18.  
  19.    USE TEST ALIAS myname
  20.  
  21.    SET COLOR TO "+W/N,B/W,,,+W/B"  
  22.  
  23.    CLS
  24.    
  25.    @  8, 1 SAY "Test"
  26.    @  9, 2 SAY "     Get 1:"
  27.    @ 10, 2 SAY "Browse Get:"
  28.    @ 14, 2 SAY "     Get 3:"
  29.    @  9, 14 GET nField PICTURE "9999"
  30.    @ 10, 14 TO 12, 35 BROWSE        ;                 // Browse Get
  31.                   ALIAS myname  ;                     // File Alias to browse
  32.                   PICTURE "!!!!!!!!!!" ;              // Picture for get
  33.                   COLOR "+W/B,B/W,,,+W/B"  ;          // Browse colors (&get)
  34.                   FIELDS F1,F2  ;                     // Fields to browse
  35.                   DEFAULT F1 TO "ABC", F2 TO "EFG" ;  // default values
  36.                   VALID IF((GETACTIVE():name)=="F1",; // Valid for get
  37.                            IF((GETACTIVE():buffer)="ABC", .T.,.F. ), ;
  38.                                .T. ) ;
  39.                   FOR myname->F1="ABC"            // Scope of browse
  40.    @ 14, 14 GET cField PICTURE "@!"
  41.  
  42.    READ
  43.  
  44.    RETURN NIL
  45. **************************************************************************
  46.